package com.yuyou.weixin.service.impl;

import java.util.Date;
import java.util.List;

import com.yuyou.weixin.vo.resp.UserAssistStatisExcel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yuyou.weixin.entity.SrsActivityUserRelation;
import com.yuyou.weixin.mapper.SrsActivityUserRelationMapper;
import com.yuyou.weixin.service.ISrsActivityUserRelationService;
import com.yuyou.weixin.util.Sequence;

@Service
public class SrsActivityUserRelationServiceImlp implements ISrsActivityUserRelationService{

	
	@Autowired
	private SrsActivityUserRelationMapper srsActivityUserRelationMapper;


	@Override
	public int deleteByPrimaryKey(Long id) {
		return srsActivityUserRelationMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(SrsActivityUserRelation record) {
		record.setCreateTime(new Date());
		record.setId(Sequence.getSequence().nextId());
		return srsActivityUserRelationMapper.insert(record);
	}

	@Override
	public SrsActivityUserRelation selectByPrimaryKey(Long id) {
		return srsActivityUserRelationMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(SrsActivityUserRelation record) {
		return srsActivityUserRelationMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public SrsActivityUserRelation selectBySrsUserId(Long srsUserId,String projectCode) {
		return srsActivityUserRelationMapper.selectBySrsUserId(srsUserId,projectCode);
	}

	@Override
	public List<UserAssistStatisExcel> findUserAssistStatis(String projectCode) {
		return srsActivityUserRelationMapper.findUserAssistStatis(projectCode);
	}

}